Gasoline obtained by catalytic cracking requires further processing before it can satisfactorily meet the present day stringent requirements for high octane and low sulphur content. Thus catalytically cracked gasoline has a comparatively high olefin content, a low aromatics content and if there has been no initial treatment of the feedstock, an unacceptable high sulfur content. Quality improvement may be carried out by catalytic reforming with, for instance platinum-containing reforming catalysts. However, the presence of sulphur- and nitrogen-containing compounds in the reformer feedstock reduces the performance of such catalysts and removal of these compounds by catalytic hydrotreatment is thus considered necessary prior to reforming in order to ensure sufficient catalyst life time, with consequent increase in cost.